/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package AlgorithmNegex;

/**
 *
 * @author Jianwei Leng ( Chris )
 * @location: Williams Building, Level 1, Epidemiology Department
 * @history: Monday 11-16-2009  6:20 pm MST, First_Created_Time
 */

public class CuiUtilities {     
     /*   // static CuiCode CUICODE;
        static CuiName CUINAME;
        


        static {
              CUINAME = new CuiName();
              //CUITERM = new CuiTerm();
        }


        // get cui announcement name by the cui named


        // get cui announced name
        private String getCuiName( String _cuiName ) {
                String announcedName;
                int tableSize = CuiName.CUINameMemory.size();

                if ( tableSize > 0 )
                {
                        announcedName = CuiName.CUINameMemory.get( _cuiName.trim().toLowerCase() );
                       //if (cuicode == null) System.out.println("=====================null==================");
                        //else
                        //System.out.println(" 1 ============= found cuiname ["+ _cuiName +"]");
                        //System.out.println(" 2 ============= found cuicode ["+cuicode+"]");
                        if ( (announcedName == null ) || (announcedName.trim().length() < 1 ) ) {
                                announcedName = null;                                
                        }
                        return announcedName;
                }else{
                        System.out.println("===================================================");
                        System.out.println("|           WARNING!!!   WARNING!!!                |");
                        System.out.println("|                                                  |");
                        System.out.println("|    all class name missed in phrase_term.txt      |");
                        System.out.println("|                                                  |");
                        System.out.println("===================================================");
                        return null;
                }
                
        }

        // external Method: get the cui announcement name by cui name
        public String getAnnouncedName( String _cuiName ){
                //System.out.println("current cuiname:[" + _cuiName +"]");
                // check the validity of the quested
                if ( ( _cuiName == null ) || ( _cuiName.trim().length() < 1 ) ) {
                        return null;
                }
                
                
                // get matached Cui Announcement Name
                String announcedName = getCuiName( _cuiName );
                // if the result is valid then continue,
                //System.out.println("current return:[" + announcedName +"]");
                // otherwise, return '_cuiname'
                if ( ( announcedName == null ) || ( announcedName.trim().length() < 1 ) )
                        return null;
                else return announcedName;
                //String announcedName = findAnnounceName( cuicode );
                
                //if ( ( announcedName == null ) || ( announcedName.trim().length() < 1 ) )
                //        return null;
                //else return announcedName;
                

        }
      * */

            /*private String findAnnounceName( String _cuiCode )
        {
                String announceName;
                int tableSize = CUICODE.CUICODEMemory.size();

                if ( tableSize > 0 ) {
                        //if ( CUICODE.CUICODEMemory.containsKey( _cuiCode.trim().toLowerCase() ) )
                        announceName = (String) CUICODE.CUICODEMemory.get( _cuiCode.trim().toLowerCase() );
                        //System.out.println(" 3 ============= found announcement ["+announceName+"]");
                        if ( (announceName == null ) || (announceName.length() == 0 ))
                                announceName = null;
                }else return null;
                return announceName;

        }*/
}
